package mytest.ssw.www.myandroidproject;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;

import mytest.ssw.www.myandroidproject.activity.Setup1activity;

public class LostFindActivity extends AppCompatActivity {
    SharedPreferences sharedPreferences;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        sharedPreferences  = getSharedPreferences("config",MODE_PRIVATE);
        if (sharedPreferences.getBoolean("configed",false))
        {
            setContentView(R.layout.activity_lost_find);
            Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
            setSupportActionBar(toolbar);

            FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
            fab.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                            .setAction("Action", null).show();
                }
            });

        }
        else {
            Intent intent= new Intent(LostFindActivity.this, Setup1activity.class);
            startActivity(intent);
            finish();
        }
    }

}
